// Remove all newlines from the 'example' string variable string cleaned = example.Replace("\n", "").Replace("\r", "");
String.Replace('\n', '\r')